<?php
function queryWithExit($mysqli, $sql)
{ 
	if(!$result = $mysqli->query($sql))
	{
		echo "<br>".$sql;
		exit();
	};
	return $result;
} 
?>
